<?php
declare (strict_types = 1);

namespace app\listener\mobile;

use other\zongan\ZhongAn;
use think\Exception;
use think\facade\Log;

class ZhongAnMobileFail
{
    /**
     * 事件监听处理
     *
     * @return mixed
     */
    public function handle($event)
    {
        try {
            $mobileOrder = $event->mobileOrder;
            (new ZhongAn('zhongan.dm.adam.order.sync'))->pushOrder($mobileOrder,ZhongAn::OrderStatusRefund);
        }catch (Exception $exception){
            Log::error('众安保险订单推送失败'.$exception->getMessage());
        }

    }
}
